import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false
Vue.filter("filterPrice", (p) => {
    return p.toFixed(2)
})

Vue.filter("filterTime", (t) => {
    // t=1654675963455
    let d = new Date(t);
    let year = d.getFullYear()
    let month = (d.getMonth() + 1 + '').padStart(2, '0'); //6+''-->    '6'.padStart(2,'0') '06'
    let date = (d.getDate() + '').padStart(2, '0');
    let hours = (d.getHours() + "").padStart(2, '0')
    let minutes = (d.getMinutes() + "").padStart(2, '0')
    let seconds = (d.getSeconds() + "").padStart(2, '0')

    return `${year}-${month}-${date} ${hours}:${minutes}:${seconds}`
})
new Vue({
    render: h => h(App),
}).$mount('#app');